<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" xmlns:xu="http://www.xmldb.org/xupdate" xmlns:my="http://dummy">

	<p:processor name="oxf:request">
		<p:input name="config">
			<config >
				<include>/request</include>
			</config>
		</p:input>
		<p:output name="data" id="request"/>
	</p:processor>
	<p:processor name="oxf:xslt">
		<p:input name="data" href="#request#xpointer(/request/body)"/>
		<p:output name="data" id="doc"/>
		<p:input name="config">
			<document xsl:version="2.0" xsi:type="xs:base64Binary" content-type="text/plain" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xs="http://www.w3.org/2001/XMLSchema">
				<xsl:value-of select="/"/>
			</document>
		</p:input>
	</p:processor>

	<p:processor name="oxf:pipeline">
		<p:input name="config" href="../session.xpl"/>
		<p:output name="data" id="session"/>
	</p:processor>

	<p:processor name="my:PageRewriter">
		<p:input name="data" href="#request#xpointer(/request/body)"/>
		<p:input name="config" href="aggregate('config',#request#xpointer(/request/headers),#request#xpointer(/request/request-uri), #session#xpointer(/session/groups), #session#xpointer(/session/username))"/>
		<p:output name="data" id="modified-body"/>
	</p:processor>


<!--	<p:processor name="oxf:xslt">
		<p:input name="data" href="#new_request"/>
		<p:ouput name="data" id="config"/>
		<p:input name="config">

		</p:input>
	</p:processor>

-->

	<!--<p:processor name="oxf:servlet-include">
		<p:input name="config">
			<config>
				<servlet-name>dwr-invoker</servlet-name>
				<context-path>/plainpoll/ReverseAjax.dwr</context-path>
				<tidy-options>
					<show-warnings>false</show-warnings>
					<quiet>true</quiet>
				</tidy-options>
			</config>
		</p:input>
		<p:output name="data" id="report"/>
	</p:processor>-->

	<p:processor name="oxf:text-converter">
		<p:input name="config">
			<config>
			</config>
		</p:input>
		<p:input name="data" href="#modified-body"/>
		<p:output name="data" id="xml-doc"/>
	</p:processor>

	<p:processor name="oxf:http-serializer">
		<p:input name="config">
			<config>
				<content-type>text/javascript</content-type>
				<force-content-type>true</force-content-type>
			</config>
		</p:input>
		<p:input name="data" href="#xml-doc"/>
	</p:processor>

</p:config>